﻿

// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-06-08 16:43:21
// 负责人：Sushee
// ===================================================================

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Security.Cryptography.X509Certificates;
using OF.Component.Model;
using OF.Component.DTO;

namespace OF.Component.IDAL
{
	
	/// <summary>
	///消息 数据访问层接口  
	/// </summary>
	internal partial interface IMessage
	{
		
         /// <summary>
    	 /// 根据断言条件获取单个消息
    	 /// </summary>
    	 MessageInfo QuerySingle(Expression<Func<MessageInfo, bool>> predicate);
         /// <summary>
    	 /// 根据断言条件获获取消息列表
    	 /// </summary>
	     IList<MessageInfo> QueryList(Expression<Func<MessageInfo, bool>> predicate);

        /// <summary>
        /// 获取店铺消息
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        List<OwnerMessageDto> SearchListPageByShopId(int shopId, int pageIndex, int pageSize, out int totalRecord);
        /// <summary>
        /// 获取店铺消息
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        List<MessageInfo> SearchListFrontByShopId(int shopId, int pageIndex, int pageSize, out int totalRecord);
        /// <summary>
        /// 设置店铺的所有消息状态为已读
        /// </summary>
        /// <param name="shopId"></param>
	    void SetMessageReaded(int shopId);

	} 

	
}